<table border="1" class="table table-bordered">
	<thead>
		<tr>
			<th>Issue <?php echo $data->ID?></th>
			<th><?php echo $data->quantity_object?> câu</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
		<?php for($i=1;$i<=$data->quantity_object;$i++) {?>
		<tr>
			<td>Câu <?php echo $i?></td>
				<?php
						$answerID = $data->getAnswerID($data->ID,$i);		
						$resolve_status = $data->getStatus('answer',$answerID,'resolve_status');						 
				?>			
			<td><a href="#myModal" data-toggle="modal">answerID:<?php echo $answerID?></a></td>
			<td>resolve_version:<?php echo $answerID?> </td>
			<td>resolve status: <?php echo $resolve_status?></td>		
			<td><?php echo CHtml::dropDownList('listEditor', '', $data->getUsers(7),array('id'=>'issue_'.$data->ID.'_'.$i,'class'=>'assignee'))?></td>
			<td>
				<?php if ($resolve_status=='CONFIRMED'){?>
					<input class="btn btn-success" id="assign_<?php echo $data->ID.'_'.$i?>" type="button" value="View" onclick="window.location='http://localhost:8080/gbt/answer/update/id/7'"/>
				<?php } else if($resolve_status=='NOT ASSIGNED'){?>
					<input class="btn btn-inverse" id="assign_<?php echo $data->ID.'_'.$i?>" type="button" value="Assign to" onclick="beforeAssign(<?php echo $data->ID?>,<?php echo $i?>,'reassign')">
				<?php } else if($resolve_status=='RESOLVED'){?>
					<input class="btn btn-inverse" id="confirm_<?php echo $data->ID.'_'.$i?>" type="button" value="Confirm" onclick="beforeAssign(<?php echo $data->ID?>,<?php echo $i?>,'confirm')">
					<input class="btn btn-success" id="reassign_<?php echo $data->ID.'_'.$i?>" type="button" value="Re-assign" onclick="beforeAssign(<?php echo $data->ID?>,<?php echo $i?>,'assign')">					
				<?php } else if($resolve_status=='ASSIGNED'){?>					
					<input class="btn btn-success"  type="button" value="Resolving"></input>
				<?php } else {?>
					<input class="btn btn-success"  type="button" value="Resolving"></input>
				<?php }?>
			</td>			
		</tr>
		<?php }?>
	</tbody>
</table>
<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Modal header</h3>
  </div>
  <div class="modal-body">
    <?php $this->renderPartial('view',array('model'=>$data));?>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
    <button class="btn btn-primary">Save changes</button>
  </div>
</div>


